package cn.itcast.feign.client;
import cn.itcast.hmall.pojo.user.Address;
import cn.itcast.hmall.pojo.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 用户服务 feign接口
 *
 * TODO 需要的接口自己补充哦
 */
@FeignClient("userservice")
public interface UserClient {
    @GetMapping("/address1/{uid}")
    List<Address> findById(@PathVariable("uid") String uid);
    @GetMapping("/user/{id}")
    public User findById(@PathVariable Long id);
    @PutMapping("/user")
    public boolean update(@RequestBody User user);
    @GetMapping("/address2/{addressId}")
    public Address findAdd(@PathVariable Long addressId);
}
